def inputdigit():
    while True:
        num = input("请输入一个数字：")
        if not num.isdigit():
            continue
        else:
            num = float(num)
            return num

def inputopt():
    while True:
        opt = input("请输入操作符(+ - * /)：")
        if opt in ('+', '-', '*', '/'):
            return opt
        else:
            continue
        
def optres(num1, num2, opt):
    if opt == '+':
        res = num1 + num2
    elif opt == '-':
        res = num1 - num2
    elif opt == '*':
        res = num1 * num2
    elif opt == '/':
        res = num1 / num2
    else:
        res = None
    return res


while True:
    num1 = inputdigit()
    opt = inputopt()
    num2 = inputdigit()

    res = optres(num1, num2, opt)
        
    print("计算结果为: {:.2f}".format(res))

    endorder = input("输入exit退出程序，其它任意键继续计算: ")
    if endorder == 'exit':
        break
    else:
        continue